﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TB.DataModel.DTO;
using TB.BLL;

namespace TB.Site
{
    public partial class Default : System.Web.UI.Page
    {
        public MessageHandler MessageHandler { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {


        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Message msg = new Message(Author.Value, Email.Value, TextArea1.InnerText);
            if (SessionData.MessageHandler.SaveMessage(msg))
            {
                output.InnerText = string.Format("Your guid is {0}", msg.Guid);
            }
        }
    }
}